\hypertarget{serial_8h}{
\section{serial.h File Reference}
\label{serial_8h}\index{serial.h@{serial.h}}
}
Various definitions for the serial UART.  


{\tt \#include \char`\"{}config.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{serial_8h_62634036639f88eece6fbf226b45f84b}{BAUD}~19200
\item 
\#define \hyperlink{serial_8h_f4dc517c89f101d6696065dbba9d06e3}{UART\_\-BSCALE}~(( F\_\-CPU / BAUD / 16 ) - 1)
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{serial_8h_b11a5d77be2222a37d0b47e6556251f7}{init\_\-serial} (void)
\item 
void \hyperlink{serial_8h_3a2b24fad7e940735bcb55b9a74664be}{send\_\-byte} (uint8\_\-t value)
\item 
void \hyperlink{serial_8h_80cc9eff037f08cc712f78b971c14a2f}{send\_\-bytes} (uint8\_\-t $\ast$data, uint8\_\-t length)
\end{CompactItemize}


\subsection{Detailed Description}
Various definitions for the serial UART. 

\begin{Desc}
\item[Author:]Peter Kalauskas \end{Desc}
\begin{Desc}
\item[Date:]Jan 23, 2009 \end{Desc}
\begin{Desc}
\item[Version:]1.0 \end{Desc}


\subsection{Define Documentation}
\hypertarget{serial_8h_62634036639f88eece6fbf226b45f84b}{
\index{serial.h@{serial.h}!BAUD@{BAUD}}
\index{BAUD@{BAUD}!serial.h@{serial.h}}
\subsubsection[{BAUD}]{\setlength{\rightskip}{0pt plus 5cm}\#define BAUD~19200}}
\label{serial_8h_62634036639f88eece6fbf226b45f84b}


The baud rate desired for communication. \hypertarget{serial_8h_f4dc517c89f101d6696065dbba9d06e3}{
\index{serial.h@{serial.h}!UART\_\-BSCALE@{UART\_\-BSCALE}}
\index{UART\_\-BSCALE@{UART\_\-BSCALE}!serial.h@{serial.h}}
\subsubsection[{UART\_\-BSCALE}]{\setlength{\rightskip}{0pt plus 5cm}\#define UART\_\-BSCALE~(( F\_\-CPU / BAUD / 16 ) - 1)}}
\label{serial_8h_f4dc517c89f101d6696065dbba9d06e3}


The calculated baud rate register setting for asynchronous normal mode. 

\subsection{Function Documentation}
\hypertarget{serial_8h_b11a5d77be2222a37d0b47e6556251f7}{
\index{serial.h@{serial.h}!init\_\-serial@{init\_\-serial}}
\index{init\_\-serial@{init\_\-serial}!serial.h@{serial.h}}
\subsubsection[{init\_\-serial}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-serial (void)}}
\label{serial_8h_b11a5d77be2222a37d0b47e6556251f7}


Initialize the UART for communication with a profile 8N1

\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Robert Breznak, Peter Kalauskas \end{Desc}
\hypertarget{serial_8h_3a2b24fad7e940735bcb55b9a74664be}{
\index{serial.h@{serial.h}!send\_\-byte@{send\_\-byte}}
\index{send\_\-byte@{send\_\-byte}!serial.h@{serial.h}}
\subsubsection[{send\_\-byte}]{\setlength{\rightskip}{0pt plus 5cm}void send\_\-byte (uint8\_\-t {\em value})}}
\label{serial_8h_3a2b24fad7e940735bcb55b9a74664be}


Send a byte down the UART once the buffer has been cleared

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em value}]the byte to be sent. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Robert Breznak \end{Desc}
\hypertarget{serial_8h_80cc9eff037f08cc712f78b971c14a2f}{
\index{serial.h@{serial.h}!send\_\-bytes@{send\_\-bytes}}
\index{send\_\-bytes@{send\_\-bytes}!serial.h@{serial.h}}
\subsubsection[{send\_\-bytes}]{\setlength{\rightskip}{0pt plus 5cm}void send\_\-bytes (uint8\_\-t $\ast$ {\em data}, \/  uint8\_\-t {\em length})}}
\label{serial_8h_80cc9eff037f08cc712f78b971c14a2f}


Send an array of bytes down the UART once the buffer has been cleared

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]the array of bytes to be sent. \item[{\em length}]the length of the array of bytes. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Peter Kalauskas \end{Desc}
